//
//  math_tools.h
//  GLDemo
//
//  Created by wneqi on 14-6-1.
//  Copyright (c) 2014年 xiewneqi. All rights reserved.
//

#ifndef GLDemo_math_tools_h
#define GLDemo_math_tools_h

struct Point2
{
    float x;
    float y;
    
    Point2 operator + (const Point2& p)
    {
        return Point2 {x + p.x, y + p.y};
    }
    
    Point2 operator / (float s)
    {
        return Point2 {x / s, y /s};
    }
};

struct Point3
{
    float x;
    float y;
    float z;
    
    Point3 operator + (const Point3& p)
    {
        return Point3 {x + p.x, y + p.y, z + p.z};
    }
    
    Point3 operator / (float s)
    {
        return Point3 {x / s, y / s, z / s};
    }
    
};

#endif
